/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package taglibs;

import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
import util.Common;

/**
 *
 * @author trietto
 */
public class Login extends TagSupport {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /*
     * (non-Javadoc)
     * @see javax.servlet.jsp.tagext.TagSupport#doStartTag()
     */
    public int doStartTag() {
        try {
            JspWriter writer = pageContext.getOut();
            writer.println("<form action='LoginServlet' method='POST'>");
            writer.println("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
            writer.println("<tr>");
            writer.println("<td colspan='2' align='center'><b>LOGIN</b><br></td>");
            writer.println("</tr>");
            writer.println("<tr>");
            writer.println("<td>Username:</td>");
            writer.println("<td>" + Common.createTextbox("txtUserName", "txtUsername", "", "", "") + "</td>");
            writer.println("</tr>");
            writer.println("<tr>");
            writer.println("<td>Password:</td>");
            writer.println("<td>" + Common.createPasswordField("txtPassword", "txtPassword", "", "") + "</td>");
            writer.println("</tr>");
            writer.println("<tr colspan='2'>");
            writer.println("<td>" + Common.createSubmitButton("btnLogin", "btnLogin", "Login", "") + "</td>");
            writer.println("</tr>");
            writer.println("</table>");
            writer.println("</form>");
        } catch (Exception e) {
        }
        return SKIP_BODY;
    }
}
